/*****************************************************
 * PS5 SDK - Libkernel
 * Contains declarations and init for libkernel.
 ****************************************************/

#ifndef PS5SDK_LIBKERNEL_H
#define PS5SDK_LIBKERNEL_H

#define _FTRUNCATE_DECLARED
#define _LSEEK_DECLARED
#define _MMAP_DECLARED
#define _PSELECT_DECLARED
#define _TRUNCATE_DECLARED
#define _SELECT_DECLARED

#include <ps5/dlsym.h>
#include <sys/stat.h>

#define __DLSYM_MODULE_ID_LIBKERNEL 0x2001

typedef void *ScePthread;
typedef void *ScePthreadAttr;

struct OrbisKernelSwVersion {
    uint64_t pad0;
    char version_str[0x1C];
    uint32_t version;
    uint64_t pad1;
};

int libkernel_init();

// ==================================================
// Declarations
// ==================================================

_Fn_(int* , __error,        void);

// errno => _Fn_( __error());
#ifndef errno
#define errno (* __error())
#endif

// Sony syscalls
_Fn_(size_t     , _read,                            int fd, void *buf, size_t nbyte);
_Fn_(size_t     , _write,                           int fd, const void *buf, size_t nbyte);
_Fn_(int        , _open,                            const char *path, int flags, int mode);
_Fn_(int        , _close,                           int fd);
_Fn_(int        , _accept,                          int s, uint64_t name, int *anamelen);
_Fn_(int        , _nanosleep,                       const struct timespec *requested_time, struct timespec *remaining);
_Fn_(int        , scePthreadCreate,                 ScePthread *thread, const ScePthreadAttr *attr, void *(*entry) (void *), void *arg, const char *name);
_Fn_(int        , scePthreadDetach,                 ScePthread thread);
_Fn_(uint32_t   , sceKernelSleep,                   uint32_t seconds);
_Fn_(int        , sceKernelUsleep,                  uint32_t microseconds);
_Fn_(int        , sceKernelLoadStartModule,         const char *name, size_t argc, const void *argv, uint32_t flags, void *, int *result);

_Fn_(uint64_t   , __sys_debug_init,                 void);
_Fn_(uint64_t   , __sys_dl_get_info,                void);
_Fn_(uint64_t   , __sys_dl_get_info_2,              void);
_Fn_(uint64_t   , __sys_dl_get_list,                void);
_Fn_(uint64_t   , __sys_dl_get_metadata,            void);
_Fn_(uint64_t   , __sys_dynlib_get_info_for_libdbg, void);
_Fn_(uint64_t   , __sys_dynlib_get_list_for_libdbg, void);
_Fn_(uint64_t   , __sys_dynlib_get_info2,           void);
_Fn_(uint64_t   , __sys_dynlib_get_list2,           void);
_Fn_(uint64_t   , __sys_dynlib_load_prx,            void);
_Fn_(uint64_t   , __sys_get_proc_type_info,         void);
_Fn_(uint64_t   , __sys_is_development_mode,        void);
_Fn_(uint64_t   , __sys_kqueueex,                   void);
_Fn_(uint64_t   , __sys_namedobj_create,            void);
_Fn_(uint64_t   , __sys_namedobj_delete,            void);
_Fn_(uint64_t   , __sys_netabort,                   void);
_Fn_(uint64_t   , __sys_netcontrol,                 void);
_Fn_(uint64_t   , __sys_netgetiflist,               void);
_Fn_(uint64_t   , __sys_netgetsockinfo,             void);
_Fn_(uint64_t   , __sys_opmc_disable,               void);
_Fn_(uint64_t   , __sys_opmc_enable,                void);
_Fn_(uint64_t   , __sys_opmc_get_ctr,               void);
_Fn_(uint64_t   , __sys_opmc_get_hw,                void);
_Fn_(uint64_t   , __sys_opmc_set_ctl,               void);
_Fn_(uint64_t   , __sys_opmc_set_ctr,               void);
_Fn_(uint64_t   , __sys_opmc_set_hw,                void);
_Fn_(uint64_t   , __sys_osem_close,                 void);
_Fn_(uint64_t   , __sys_osem_open,                  void);
_Fn_(uint64_t   , __sys_randomized_path,            void);
_Fn_(uint64_t   , __sys_rdup,                       void);
_Fn_(uint64_t   , __sys_regmgr_call,                void);
_Fn_(uint64_t   , __sys_set_uevt,                   void);
_Fn_(uint64_t   , __sys_socketclose,                void);
_Fn_(uint64_t   , __sys_socketex,                   void);
_Fn_(uint64_t   , __sys_test_debug_rwmem,           void);
_Fn_(uint64_t   , __sys_workaround8849,             void);

// Underscore variants
_Fn_(uint64_t   , _bind,                                void);
_Fn_(uint64_t   , _connect,                             void);
_Fn_(uint64_t   , _dup2,                                void);
_Fn_(uint64_t   , _execve,                              void);
_Fn_(uint64_t   , _execvpe,                             void);
_Fn_(void       , _exit,                                int);
_Fn_(uint64_t   , _fcntl,                               void);
_Fn_(uint64_t   , _fpathconf,                           void);
_Fn_(uint64_t   , _fstat,                               int fd, struct stat *buf);
_Fn_(uint64_t   , _fstatfs,                             void);
_Fn_(uint64_t   , _getdirentries,                       void);
_Fn_(uint64_t   , _getpeername,                         void);
_Fn_(uint64_t   , _getsockname,                         void);
_Fn_(uint64_t   , _getsockopt,                          void);
_Fn_(uint64_t   , _ioctl,                               int fd, unsigned long req, unsigned long data);
_Fn_(uint64_t   , _is_signal_return,                    void);
_Fn_(uint64_t   , _listen,                              void);
_Fn_(uint64_t   , _openat,                              void);
_Fn_(uint64_t   , _readv,                               void);
_Fn_(uint64_t   , _recvfrom,                            void);
_Fn_(uint64_t   , _recvmsg,                             void);
_Fn_(uint64_t   , _sceKernelRtldSetApplicationHeapAPI,  void);
_Fn_(uint64_t   , _sceKernelRtldThreadAtexitDecrement,  void);
_Fn_(uint64_t   , _sceKernelRtldThreadAtexitIncrement,  void);
_Fn_(uint64_t   , _sceKernelSetThreadDtors,             void);
_Fn_(uint64_t   , _sceKernelSetThreadAtexitCount,       void);
_Fn_(uint64_t   , _sceKernelSetThreadAtexitReport,      void);
_Fn_(uint64_t   , _sendmsg,                             void);
_Fn_(uint64_t   , _sendto,                              void);
_Fn_(uint64_t   , _setsockopt,                          void);
_Fn_(uint64_t   , _sigaction,                           void);
_Fn_(uint64_t   , _sigprocmask,                         void);
_Fn_(uint64_t   , _sigsuspend,                          void);
_Fn_(uint64_t   , _umtx_op,                             void);
_Fn_(uint64_t   , _wait4,                               void);
_Fn_(uint64_t   , _writev,                              void);

// Functions not covered by headers properly (use macros, internal functions, etc)
#undef inet_pton
_Fn_(int        , inet_pton,                            int af, const char * src, void * dst);

#ifndef htons
_Fn_(uint16_t   , htons,                                uint16_t hostshort);
#endif

// Sony functions
_Fn_(uint64_t   , sceKernelAddCpumodeEvent,                     void);
_Fn_(uint64_t   , sceKernelAddFileEvent,                        void);
_Fn_(uint64_t   , sceKernelAddGpuExceptionEvent,                void);
_Fn_(uint64_t   , sceKernelAddHRTimerEvent,                     void);
_Fn_(uint64_t   , sceKernelAddProcessToCanvasMap,               void);
_Fn_(uint64_t   , sceKernelAddReadEvent,                        void);
_Fn_(uint64_t   , sceKernelAddTimerEvent,                       void);
_Fn_(uint64_t   , sceKernelAddUserEvent,                        void);
_Fn_(uint64_t   , sceKernelAddUserEventEdge,                    void);
_Fn_(uint64_t   , sceKernelAddWriteEvent,                       void);
_Fn_(uint64_t   , sceKernelAddExternalTriggerEvent,             void);
_Fn_(uint64_t   , sceKernelAddAmprEvent,                        void);
_Fn_(uint64_t   , sceKernelDeleteAmprEvent,                     void);
_Fn_(uint64_t   , sceKernelAddAmprSystemEvent,                  void);
_Fn_(uint64_t   , sceKernelDeleteAmprSystemEvent,               void);
_Fn_(uint64_t   , sceKernelAioCancelRequest,                    void);
_Fn_(uint64_t   , sceKernelAioCancelRequests,                   void);
_Fn_(uint64_t   , sceKernelAioDeleteRequest,                    void);
_Fn_(uint64_t   , sceKernelAioDeleteRequests,                   void);
_Fn_(uint64_t   , sceKernelAioInitializeImpl,                   void);
_Fn_(uint64_t   , sceKernelAioInitializeParam,                  void);
_Fn_(uint64_t   , sceKernelAioPollRequest,                      void);
_Fn_(uint64_t   , sceKernelAioPollRequests,                     void);
_Fn_(uint64_t   , sceKernelAioSetParam,                         void);
_Fn_(uint64_t   , sceKernelAioSubmitReadCommands,               void);
_Fn_(uint64_t   , sceKernelAioSubmitReadCommandsMultiple,       void);
_Fn_(uint64_t   , sceKernelAioSubmitWriteCommands,              void);
_Fn_(uint64_t   , sceKernelAioSubmitWriteCommandsMultiple,      void);
_Fn_(uint64_t   , sceKernelAioWaitRequest,                      void);
_Fn_(uint64_t   , sceKernelAioWaitRequests,                     void);
_Fn_(uint64_t   , sceKernelAllocateDirectMemory,                void);
_Fn_(uint64_t   , sceKernelAllocateDirectMemory2,               void);
_Fn_(uint64_t   , sceKernelAllocateDirectMemoryForMiniApp,      void);
_Fn_(uint64_t   , sceKernelAllocateDirectMemoryForApp,          void);
_Fn_(uint64_t   , sceKernelAllocateMainDirectMemory,            void);
_Fn_(uint64_t   , sceKernelAllocateRemainingToolMemory,         void);
_Fn_(uint64_t   , sceKernelAllocateToolMemory,                  void);
_Fn_(uint64_t   , sceKernelAllocateTraceDirectMemory,           void);
_Fn_(uint64_t   , sceKernelAvailableDirectMemorySize,           void);
_Fn_(uint64_t   , sceKernelAvailableFlexibleMemorySize,         void);
_Fn_(uint64_t   , sceKernelAvailableFlexibleMemorySizeForPid,   void);
_Fn_(uint64_t   , sceKernelAvailableToolMemorySize,             void);
_Fn_(uint64_t   , sceKernelBacktraceSelf,                       void);
_Fn_(uint64_t   , sceKernelBatchMap,                            void);
_Fn_(uint64_t   , sceKernelBatchMap2,                           void);
_Fn_(uint64_t   , sceKernelCancelEventFlag,                     void);
_Fn_(uint64_t   , sceKernelCancelSema,                          void);
_Fn_(uint64_t   , sceKernelCheckProsperoSdkVersion,             void);
_Fn_(uint64_t   , sceKernelCheckReachability,                   void);
_Fn_(uint64_t   , sceKernelCheckedReleaseDirectMemory,          void);
_Fn_(uint64_t   , sceKernelChmod,                               void);
_Fn_(uint64_t   , sceKernelClearBootReqNotifyCount,             void);
_Fn_(uint64_t   , sceKernelClearEventFlag,                      void);
_Fn_(uint64_t   , sceKernelClearGameDirectMemory,               void);
_Fn_(uint64_t   , sceKernelClearMaxSocPowerConsumption,         void);
_Fn_(uint64_t   , sceKernelClockGetres,                         void);
_Fn_(uint64_t   , sceKernelClockGettime,                        void);
_Fn_(uint64_t   , sceKernelClose,                               int fd);
_Fn_(uint64_t   , sceKernelCloseEport,                          void);
_Fn_(uint64_t   , sceKernelCloseEventFlag,                      void);
_Fn_(uint64_t   , sceKernelCloseSema,                           void);
_Fn_(uint64_t   , sceKernelConfiguredFlexibleMemorySize,        void);
_Fn_(uint64_t   , sceKernelConfiguredFlexibleMemorySizeForPid,  void);
_Fn_(uint64_t   , sceKernelConvertLocaltimeToUtc,               void);
_Fn_(uint64_t   , sceKernelConvertUtcToLocaltime,               void);
_Fn_(uint64_t   , sceKernelCreateEport,                         void);
_Fn_(uint64_t   , sceKernelCreateEqueue,                        void);
_Fn_(uint64_t   , sceKernelCreateEventFlag,                     void);
_Fn_(uint64_t   , sceKernelCreateSema,                          void);
_Fn_(uint64_t   , sceKernelDebugAcquireAndUpdateDebugRegister,  void);
_Fn_(uint64_t   , sceKernelDebugGetAppStatus,                   void);
_Fn_(uint64_t   , sceKernelDebugGetPauseCount,                  void);
_Fn_(uint64_t   , sceKernelDebugGpuPaDebugIsInProgress,         void);
_Fn_(uint64_t   , sceKernelDebugOutText,                        void);
_Fn_(uint64_t   , sceKernelDebugRaiseException,                 void);
_Fn_(uint64_t   , sceKernelDebugRaiseExceptionOnReleaseMode,    void);
_Fn_(uint64_t   , sceKernelDebugRaiseExceptionWithContext,      void);
_Fn_(uint64_t   , sceKernelDebugRaiseExceptionWithInfo,         void);
_Fn_(uint64_t   , sceKernelDebugReleaseDebugContext,            void);
_Fn_(uint64_t   , sceKernelDeleteCpumodeEvent,                  void);
_Fn_(uint64_t   , sceKernelDeleteEport,                         void);
_Fn_(uint64_t   , sceKernelDeleteEqueue,                        void);
_Fn_(uint64_t   , sceKernelDeleteEventFlag,                     void);
_Fn_(uint64_t   , sceKernelDeleteFileEvent,                     void);
_Fn_(uint64_t   , sceKernelDeleteGpuExceptionEvent,             void);
_Fn_(uint64_t   , sceKernelDeleteHRTimerEvent,                  void);
_Fn_(uint64_t   , sceKernelDeleteProcessFromCanvasMap,          void);
_Fn_(uint64_t   , sceKernelDeleteReadEvent,                     void);
_Fn_(uint64_t   , sceKernelDeleteSema,                          void);
_Fn_(uint64_t   , sceKernelDeleteTimerEvent,                    void);
_Fn_(uint64_t   , sceKernelDeleteUserEvent,                     void);
_Fn_(uint64_t   , sceKernelDeleteWriteEvent,                    void);
_Fn_(uint64_t   , sceKernelDeleteExternalTriggerEvent,          void);
_Fn_(uint64_t   , sceKernelDirectMemoryQuery,                   void);
_Fn_(uint64_t   , sceKernelDirectMemoryQueryForId,              void);
_Fn_(uint64_t   , sceKernelDlsym,                               void);
_Fn_(uint64_t   , sceKernelEnableDmemAliasing,                  void);
_Fn_(uint64_t   , sceKernelEnableDmemAliasing2,                 void);
_Fn_(uint64_t   , sceKernelEnablePthreadObjectCheck,            void);
_Fn_(uint64_t   , sceKernelError,                               void);
_Fn_(uint64_t   , sceKernelEventLogInit,                        void);
_Fn_(uint64_t   , sceKernelEventLogPread,                       void);
_Fn_(uint64_t   , sceKernelEventLogRead,                        void);
_Fn_(uint64_t   , sceKernelEventLogWrite,                       void);
_Fn_(uint64_t   , sceKernelWriteSdkEventLog,                    void);
_Fn_(uint64_t   , sceKernelWriteSdkEventLogV,                   void);
_Fn_(uint64_t   , sceKernelFchmod,                              void);
_Fn_(uint64_t   , sceKernelFcntl,                               void);
_Fn_(uint64_t   , sceKernelFlock,                               void);
_Fn_(uint64_t   , sceKernelFstat,                               void);
_Fn_(uint64_t   , sceKernelFsync,                               void);
_Fn_(uint64_t   , sceKernelFdatasync,                           void);
_Fn_(uint64_t   , sceKernelFtruncate,                           void);
_Fn_(uint64_t   , sceKernelFutimes,                             void);
_Fn_(uint64_t   , sceKernelGetAllowedSdkVersionOnSystem,        void);
_Fn_(uint64_t   , sceKernelGetAppCategoryType,                  void);
_Fn_(uint64_t   , sceKernelGetAppInfo,                          void);
_Fn_(uint64_t   , sceKernelGetAppLibcData,                      void);
_Fn_(uint64_t   , sceKernelGetAslrStatus,                       void);
_Fn_(uint64_t   , sceKernelGetBioUsageAll,                      void);
_Fn_(uint64_t   , sceKernelGetBackupRestoreMode,                void);
_Fn_(uint64_t   , sceKernelGetBackupRestoreModeOfNextBoot,      void);
_Fn_(uint64_t   , sceKernelGetBasicProductShape,                void);
_Fn_(uint64_t   , sceKernelGetBetaUpdateTestForRcmgr,           void);
_Fn_(uint64_t   , sceKernelGetBootReqNotifyCount,               void);
_Fn_(uint64_t   , sceKernelGetCallRecord,                       void);
_Fn_(uint64_t   , sceKernelGetCompiledSdkVersion,               void);
_Fn_(uint64_t   , sceKernelGetCompiledSdkVersionByPath,         void);
_Fn_(uint64_t   , sceKernelGetCompiledSdkVersionByPid,          void);
_Fn_(uint64_t   , sceKernelGetGenuineProsperoCompiledSdkVersion,        void);
_Fn_(uint64_t   , sceKernelGetGenuineProsperoCompiledSdkVersionByPid,   void);
_Fn_(uint64_t   , sceKernelGetPrefixVersion,                            void);
_Fn_(uint64_t   , sceKernelGetProsperoCompiledSdkVersion,               void);
_Fn_(uint64_t   , sceKernelGetProsperoCompiledSdkVersionByPath,         void);
_Fn_(uint64_t   , sceKernelGetProsperoCompiledSdkVersionByPid,          void);
_Fn_(uint64_t   , sceKernelGetPs4CompiledSdkVersion,                    void);
_Fn_(uint64_t   , sceKernelGetPs4CompiledSdkVersionByPath,              void);
_Fn_(uint64_t   , sceKernelGetPs4CompiledSdkVersionByPid,               void);
_Fn_(uint64_t   , sceKernelGetCanvasHandle,                             void);
_Fn_(uint64_t   , sceKernelGetCanvasHandleByApplicationLocalPid,        void);
_Fn_(uint64_t   , sceKernelGetCanvasHandleByPid,                void);
_Fn_(uint64_t   , sceKernelGetCpuCoreClock,                     void);
_Fn_(uint64_t   , sceKernelGetCpuFrequency,                     void);
_Fn_(uint64_t   , sceKernelGetCpuTemperature,                   void);
_Fn_(uint64_t   , sceKernelGetCpuUsage,                         void);
_Fn_(uint64_t   , sceKernelGetCpuUsageAll,                      void);
_Fn_(uint64_t   , sceKernelGetCpuUsageProc,                     void);
_Fn_(uint64_t   , sceKernelGetCpuUsageProc2,                    void);
_Fn_(uint64_t   , sceKernelGetCpuUsageThread,                   void);
_Fn_(uint64_t   , sceKernelGetCpumode,                          void);
_Fn_(uint64_t   , sceKernelGetCpumodeGame,                      void);
_Fn_(uint64_t   , sceKernelGetCurrentCpu,                       void);
_Fn_(uint64_t   , sceKernelGetDataTransferMode,                 void);
_Fn_(uint64_t   , sceKernelGetDebugMenuMiniModeForRcmgr,        void);
_Fn_(uint64_t   , sceKernelGetDebugMenuModeForPsmForRcmgr,      void);
_Fn_(uint64_t   , sceKernelGetDebugMenuModeForRcmgr,            void);
_Fn_(uint64_t   , sceKernelGetDefaultToolMemorySize,            void);
_Fn_(uint64_t   , sceKernelGetDirectMemorySize,                 void);
_Fn_(uint64_t   , sceKernelGetDirectMemorySizeForPid,           void);
_Fn_(uint64_t   , sceKernelGetDirectMemoryType,                 void);
_Fn_(uint64_t   , sceKernelGetEventData,                        void);
_Fn_(uint64_t   , sceKernelGetEventError,                       void);
_Fn_(uint64_t   , sceKernelGetEventFflags,                      void);
_Fn_(uint64_t   , sceKernelGetEventFilter,                      void);
_Fn_(uint64_t   , sceKernelGetEventId,                          void);
_Fn_(uint64_t   , sceKernelGetEventUserData,                    void);
_Fn_(uint64_t   , sceKernelGetExecutableModuleHandle,           void);
_Fn_(uint64_t   , sceKernelGetExtLibcHandle,                    void);
_Fn_(uint64_t   , sceKernelGetFakeFinalizeMenuForRcmgr,         void);
_Fn_(uint64_t   , sceKernelGetFlagedUpdaterForRcmgr,            void);
_Fn_(uint64_t   , sceKernelGetForceUpdateModeForRcmgr,          void);
_Fn_(uint64_t   , sceKernelGetFsSandboxRandomWord,              void);
_Fn_(uint64_t   , sceKernelGetGenuineProsperoSystemSwVersion,   void);
_Fn_(uint64_t   , sceKernelGetGPI,                              void);
_Fn_(uint64_t   , sceKernelGetGPO,                              void);
_Fn_(uint64_t   , sceKernelGetHwFeatureInfoForDecid,            void);
_Fn_(uint64_t   , sceKernelGetIdPs,                             void);
_Fn_(uint64_t   , sceKernelGetIdTableCurrentCount,              void);
_Fn_(uint64_t   , sceKernelGetIpcPath,                          void);
_Fn_(uint64_t   , sceKernelGetKnobs,                            void);
_Fn_(uint64_t   , sceKernelGetLibkernelTextLocation,            void);
_Fn_(uint64_t   , sceKernelGetMainSocId,                        void);
_Fn_(uint64_t   , sceKernelGetModuleInfo,                       void);
_Fn_(uint64_t   , sceKernelGetModuleInfoForUnwind,              void);
_Fn_(uint64_t   , sceKernelGetModuleInfoFromAddr,               void);
_Fn_(uint64_t   , sceKernelGetModuleInfoInternal,               void);
_Fn_(uint64_t   , sceKernelGetModuleList,                       void);
_Fn_(uint64_t   , sceKernelGetModuleListInternal,               void);
_Fn_(uint64_t   , sceKernelGetOpenPsIdForSystem,                void);
_Fn_(uint64_t   , sceKernelGetPageTableStats,                   void);
_Fn_(uint64_t   , sceKernelGetPageTableStatsForPid,             void);
_Fn_(uint64_t   , sceKernelGetPagingStatsOfAllObjects,          void);
_Fn_(uint64_t   , sceKernelGetPagingStatsOfAllThreads,          void);
_Fn_(uint64_t   , sceKernelGetProcParam,                        void);
_Fn_(uint64_t   , sceKernelGetProcessAbiType,                   void);
_Fn_(uint64_t   , sceKernelGetProcessName,                      void);
_Fn_(uint64_t   , sceKernelGetProcessType,                      void);
_Fn_(uint64_t   , sceKernelGetProcessTime,                      void);
_Fn_(uint64_t   , sceKernelGetProcessTimeCounter,               void);
_Fn_(uint64_t   , sceKernelGetProcessTimeCounterFrequency,      void);
_Fn_(uint64_t   , sceKernelGetProductCode,                      void);
_Fn_(uint64_t   , sceKernelGetProductStr,                       void);
_Fn_(uint64_t   , sceKernelGetProsperoSystemSwVersion,          struct OrbisKernelSwVersion *);
_Fn_(uint64_t   , sceKernelGetPrtAperture,                      void);
_Fn_(uint64_t   , sceKernelGetPs4SystemSwVersion,               void);
_Fn_(uint64_t   , sceKernelGetPsmIntdevModeForRcmgr,            void);
_Fn_(uint64_t   , sceKernelGetPsnAccessTraceLogForRcmgr,        void);
_Fn_(uint64_t   , sceKernelGetQafExpirationTimeNotafterForRcmgr,        void);
_Fn_(uint64_t   , sceKernelGetQafExpirationTimeNotbeforeForRcmgr,       void);
_Fn_(uint64_t   , sceKernelGetQafGenerationForRcmgr,            void);
_Fn_(uint64_t   , sceKernelGetQafNameForRcmgr,                  void);
_Fn_(uint64_t   , sceKernelGetRenderingMode,                    void);
_Fn_(uint64_t   , sceKernelGetResidentCount,                    void);
_Fn_(uint64_t   , sceKernelGetResidentFmemCount,                void);
_Fn_(uint64_t   , sceKernelGetSafemode,                         void);
_Fn_(uint64_t   , sceKernelGetSanitizerMallocReplace,           void);
_Fn_(uint64_t   , sceKernelGetSanitizerMallocReplaceExternal,   void);
_Fn_(uint64_t   , sceKernelGetSanitizerNewReplace,              void);
_Fn_(uint64_t   , sceKernelGetSanitizerNewReplaceExternal,      void);
_Fn_(uint64_t   , sceKernelGetSocClock,                         void);
_Fn_(uint64_t   , sceKernelGetSocPowerConsumption,              void);
_Fn_(uint64_t   , sceKernelGetSocSensorTemperature,             void);
_Fn_(uint64_t   , sceKernelGetSpecialIForRcmgr,                 void);
_Fn_(uint64_t   , sceKernelGetSubsysId,                         void);
_Fn_(uint64_t   , sceKernelGetSubsysSubId,                      void);
_Fn_(uint64_t   , sceKernelGetSystemLevelDebuggerModeForRcmgr,  void);
_Fn_(uint64_t   , sceKernelGetSystemSwBeta,                     void);
_Fn_(uint64_t   , sceKernelGetSystemSwVersion,                  struct OrbisKernelSwVersion*);
_Fn_(uint64_t   , sceKernelGetThreadName,                       void);
_Fn_(uint64_t   , sceKernelGetToolMemoryRange,                  void);
_Fn_(uint64_t   , sceKernelGetTraceMemoryStats,                 void);
_Fn_(uint64_t   , sceKernelGetTscFrequency,                     void);
_Fn_(uint64_t   , sceKernelGetUniversalMode,                    void);
_Fn_(uint64_t   , sceKernelGetUtokenDataExecutionForRcmgr,      void);
_Fn_(uint64_t   , sceKernelGetUtokenExpirationTimeNotafterForRcmgr,     void);
_Fn_(uint64_t   , sceKernelGetUtokenExpirationTimeNotbeforeForRcmgr,    void);
_Fn_(uint64_t   , sceKernelGetUtokenFakeSharefactoryForRcmgr,           void);
_Fn_(uint64_t   , sceKernelGetUtokenFlagedUpdaterForRcmgr,      void);
_Fn_(uint64_t   , sceKernelGetUtokenNpEnvSwitchingForRcmgr,     void);
_Fn_(uint64_t   , sceKernelGetUtokenSaveDataRepairForRcmgr,     void);
_Fn_(uint64_t   , sceKernelGetUtokenStoreModeForRcmgr,          void);
_Fn_(uint64_t   , sceKernelGetUtokenUseSoftwagnerForAcmgr,      void);
_Fn_(uint64_t   , sceKernelGetUtokenUseSoftwagnerForRcmgr,      void);
_Fn_(uint64_t   , sceKernelGetUtokenWeakenedPortRestrictionForRcmgr,    void);
_Fn_(uint64_t   , sceKernelGetVrCaptureSize,                    void);
_Fn_(uint64_t   , sceKernelGetdents,                            int fd, char *buf, int nbytes);
_Fn_(uint64_t   , sceKernelGetdirentries,                       void);
_Fn_(uint64_t   , sceKernelGettimeofday,                        void);
_Fn_(uint64_t   , sceKernelGettimezone,                         void);
_Fn_(uint64_t   , sceKernelHasNeoMode,                          void);
_Fn_(uint64_t   , sceKernelHwHasOpticalOut,                     void);
_Fn_(uint64_t   , sceKernelHwHasWlanBt,                         void);
_Fn_(uint64_t   , sceKernelHwGetBdDriveInfo,                    void);
_Fn_(uint64_t   , sceKernelIccControlBDPowerState,              void);
_Fn_(uint64_t   , sceKernelIccControlUSBPowerState,             void);
_Fn_(uint64_t   , sceKernelIccGetBDPowerState,                  void);
_Fn_(uint64_t   , sceKernelIccGetCPMode,                        void);
_Fn_(uint64_t   , sceKernelIccGetCpuInfoBit,                    void);
_Fn_(uint64_t   , sceKernelIccGetPowerNumberOfBootShutdown,     void);
_Fn_(uint64_t   , sceKernelIccGetPowerOperatingTime,            void);
_Fn_(uint64_t   , sceKernelIccGetPowerUpCause,                  void);
_Fn_(uint64_t   , sceKernelIccGetThermalAlert,                  void);
_Fn_(uint64_t   , sceKernelIccGetUSBPowerState,                 void);
_Fn_(uint64_t   , sceKernelIccIndicatorBootDone,                void);
_Fn_(uint64_t   , sceKernelIccIndicatorShutdown,                void);
_Fn_(uint64_t   , sceKernelIccIndicatorStandby,                 void);
_Fn_(uint64_t   , sceKernelIccIndicatorStandbyBoot,             void);
_Fn_(uint64_t   , sceKernelIccIndicatorStandbyShutdown,         void);
_Fn_(uint64_t   , sceKernelIccNotifyBootStatus,                 void);
_Fn_(uint64_t   , sceKernelIccNvsFlush,                         void);
_Fn_(uint64_t   , sceKernelIccReadPowerBootMessage,             void);
_Fn_(uint64_t   , sceKernelIccSetBuzzer,                        void);
_Fn_(uint64_t   , sceKernelIccSetCPMode,                        void);
_Fn_(uint64_t   , sceKernelIccSetCpuInfoBit,                    void);
_Fn_(uint64_t   , sceKernelIccSetDownloadMode,                  void);
_Fn_(uint64_t   , sceKernelIccSetPriorityBuzzer,                void);
_Fn_(uint64_t   , sceKernelInstallExceptionHandler,             void);
_Fn_(uint64_t   , sceKernelInternalGetKmemStatistics,           void);
_Fn_(uint64_t   , sceKernelInternalGetMapStatistics,            void);
_Fn_(uint64_t   , sceKernelInternalHeapPrintBacktraceWithModuleInfo,    void);
_Fn_(uint64_t   , sceKernelPrintBacktraceWithModuleInfo,        void);
_Fn_(uint64_t   , sceKernelInternalMapDirectMemory,             void);
_Fn_(uint64_t   , sceKernelInternalMapNamedDirectMemory,        void);
_Fn_(uint64_t   , sceKernelInternalMemoryGetAvailableSize,      void);
_Fn_(uint64_t   , sceKernelInternalMemoryGetModuleSegmentInfo,  void);
_Fn_(uint64_t   , sceKernelInternalResumeDirectMemoryRelease,   void);
_Fn_(uint64_t   , sceKernelInternalSuspendDirectMemoryRelease,  void);
_Fn_(uint64_t   , sceKernelIsAddressSanitizerEnabled,           void);
_Fn_(uint64_t   , sceKernelIsThreadSanitizerEnabled,            void);
_Fn_(uint64_t   , sceKernelIsAllowedToSelectDvdRegion,          void);
_Fn_(uint64_t   , sceKernelIsAuthenticNeo,                      void);
_Fn_(uint64_t   , sceKernelIsCEX,                               void);
_Fn_(uint64_t   , sceKernelIsDebuggerAttached,                  void);
_Fn_(uint64_t   , sceKernelIsDevKit,                            void);
_Fn_(uint64_t   , sceKernelIsGenuineCEX,                        void);
_Fn_(uint64_t   , sceKernelIsGenuineCronosCex,                  void);
_Fn_(uint64_t   , sceKernelIsGenuineDevKit,                     void);
_Fn_(uint64_t   , sceKernelIsGenuineKratosCex,                  void);
_Fn_(uint64_t   , sceKernelIsGenuineN,                          void);
_Fn_(uint64_t   , sceKernelIsGenuineTestKit,                    void);
_Fn_(uint64_t   , sceKernelIsInSandbox,                         void);
_Fn_(uint64_t   , sceKernelIsKratos,                            void);
_Fn_(uint64_t   , sceKernelIsMainOnStanbyMode,                  void);
_Fn_(uint64_t   , sceKernelIsMainOnStandbyMode,                 void);
_Fn_(uint64_t   , sceKernelIsNeoMode,                           void);
_Fn_(uint64_t   , sceKernelIsPs4Process,                        void);
_Fn_(uint64_t   , sceKernelIsStack,                             void);
_Fn_(uint64_t   , sceKernelIsTestKit,                           void);
_Fn_(uint64_t   , sceKernelKernelHeapUsage,                     void);
_Fn_(uint64_t   , sceKernelLoadStartModuleForSysmodule,         void);
_Fn_(uint64_t   , sceKernelLseek,                               void);
_Fn_(uint64_t   , sceKernelLwfsAllocateBlock,                   void);
_Fn_(uint64_t   , sceKernelLwfsLseek,                           void);
_Fn_(uint64_t   , sceKernelLwfsSetAttribute,                    void);
_Fn_(uint64_t   , sceKernelLwfsTrimBlock,                       void);
_Fn_(uint64_t   , sceKernelLwfsWrite,                           void);
_Fn_(uint64_t   , sceKernelMapDirectMemory,                     void);
_Fn_(uint64_t   , sceKernelMapDirectMemory2,                    void);
_Fn_(uint64_t   , sceKernelMapFlexibleMemory,                   void);
_Fn_(uint64_t   , sceKernelMapNamedDirectMemory,                void);
_Fn_(uint64_t   , sceKernelMapNamedFlexibleMemory,              void);
_Fn_(uint64_t   , sceKernelMapNamedSystemFlexibleMemory,        void);
_Fn_(uint64_t   , sceKernelMapSanitizerShadowMemory,            void);
_Fn_(uint64_t   , sceKernelMapToolMemory,                       void);
_Fn_(uint64_t   , sceKernelMapTraceMemory,                      void);
_Fn_(uint64_t   , sceKernelMemoryPoolBatch,                     void);
_Fn_(uint64_t   , sceKernelMemoryPoolCommit,                    void);
_Fn_(uint64_t   , sceKernelMemoryPoolDecommit,                  void);
_Fn_(uint64_t   , sceKernelMemoryPoolExpand,                    void);
_Fn_(uint64_t   , sceKernelMemoryPoolGetBlockStats,             void);
_Fn_(uint64_t   , sceKernelMemoryPoolMove,                      void);
_Fn_(uint64_t   , sceKernelMemoryPoolReserve,                   void);
_Fn_(uint64_t   , sceKernelMkdir,                               void);
_Fn_(uint64_t   , sceKernelMlock,                               void);
_Fn_(uint64_t   , sceKernelMlockall,                            void);
_Fn_(uint64_t   , sceKernelMmap,                                void);
_Fn_(uint64_t   , sceKernelMprotect,                            void);
_Fn_(uint64_t   , sceKernelMsync,                               void);
_Fn_(uint64_t   , sceKernelMtypeprotect,                        void);
_Fn_(uint64_t   , sceKernelMunlock,                             void);
_Fn_(uint64_t   , sceKernelMunlockall,                          void);
_Fn_(uint64_t   , sceKernelMunmap,                              void);
_Fn_(uint64_t   , sceKernelNanosleep,                           void);
_Fn_(uint64_t   , sceKernelNormalizePath,                       void);
_Fn_(uint64_t   , sceKernelNotifyAppStateChanged,               void);
_Fn_(uint64_t   , sceKernelNotifySystemSuspendResumeProgress,   void);
_Fn_(uint64_t   , sceKernelNotifySystemSuspendStart,            void);
_Fn_(uint64_t   , sceKernelOpen,                                char *path, int flags, int mode);
_Fn_(uint64_t   , sceKernelOpenInternal,                        void);
_Fn_(uint64_t   , sceKernelOpenEport,                           void);
_Fn_(uint64_t   , sceKernelOpenEventFlag,                       void);
_Fn_(uint64_t   , sceKernelOpenSema,                            void);
_Fn_(uint64_t   , sceKernelPltTrap,                             void);
_Fn_(uint64_t   , sceKernelPollEventFlag,                       void);
_Fn_(uint64_t   , sceKernelPollSema,                            void);
_Fn_(uint64_t   , sceKernelPread,                               void);
_Fn_(uint64_t   , sceKernelPreadv,                              void);
_Fn_(uint64_t   , sceKernelProtectDirectMemory,                 void);
_Fn_(uint64_t   , sceKernelProtectDirectMemoryForPID,           void);
_Fn_(uint64_t   , sceKernelPwrite,                              void);
_Fn_(uint64_t   , sceKernelPwritev,                             void);
_Fn_(uint64_t   , sceKernelQueryMemoryProtection,               void);
_Fn_(uint64_t   , sceKernelQueryToolMemory,                     void);
_Fn_(uint64_t   , sceKernelQueryTraceMemory,                    void);
_Fn_(uint64_t   , sceKernelRaiseException,                      void);
_Fn_(uint64_t   , sceKernelRandomizedPath,                      void);
_Fn_(uint64_t   , sceKernelRdup,                                void);
_Fn_(uint64_t   , sceKernelRead,                                void);
_Fn_(uint64_t   , sceKernelReadTsc,                             void);
_Fn_(uint64_t   , sceKernelReadv,                               void);
_Fn_(uint64_t   , sceKernelReboot,                              void);
_Fn_(uint64_t   , sceKernelReleaseDirectMemory,                 void);
_Fn_(uint64_t   , sceKernelReleaseFlexibleMemory,               void);
_Fn_(uint64_t   , sceKernelReleaseToolMemory,                   void);
_Fn_(uint64_t   , sceKernelReleaseTraceDirectMemory,            void);
_Fn_(uint64_t   , sceKernelRemoveExceptionHandler,              void);
_Fn_(uint64_t   , sceKernelRename,                              void);
_Fn_(uint64_t   , sceKernelReportUnpatchedFunctionCall,         void);
_Fn_(uint64_t   , sceKernelReserveSystemDirectMemory,           void);
_Fn_(uint64_t   , sceKernelReserveVirtualRange,                 void);
_Fn_(uint64_t   , sceKernelResumeDirectMemoryRelease,           void);
_Fn_(uint64_t   , sceKernelRmdir,                               void);
_Fn_(uint64_t   , sceKernelRtldControl,                         void);
_Fn_(uint64_t   , sceKernelSandboxPath,                         void);
_Fn_(uint64_t   , sceKernelSendNotificationRequest,             void);
_Fn_(uint64_t   , sceKernelSetAppInfo,                          void);
_Fn_(uint64_t   , sceKernelSetAppLibcData,                      void);
_Fn_(uint64_t   , sceKernelSetBackupRestoreMode,                void);
_Fn_(uint64_t   , sceKernelSetBaseModeClock,                    void);
_Fn_(uint64_t   , sceKernelSetBesteffort,                       void);
_Fn_(uint64_t   , sceKernelSetBootReqNotify,                    void);
_Fn_(uint64_t   , sceKernelSetCallRecord,                       void);
_Fn_(uint64_t   , sceKernelSetCanvasHandle,                     void);
_Fn_(uint64_t   , sceKernelSetCompressionAttribute,             void);
_Fn_(uint64_t   , sceKernelSetCpumodeGame,                      void);
_Fn_(uint64_t   , sceKernelSetDataTransferMode,                 void);
_Fn_(uint64_t   , sceKernelSetEventFlag,                        void);
_Fn_(uint64_t   , sceKernelSetFsstParam,                        void);
_Fn_(uint64_t   , sceKernelSetGPI,                              void);
_Fn_(uint64_t   , sceKernelSetGPO,                              void);
_Fn_(uint64_t   , sceKernelSetGameDirectMemoryLimit,            void);
_Fn_(uint64_t   , sceKernelSetGpuCu,                            void);
_Fn_(uint64_t   , sceKernelSetKnobs,                            void);
_Fn_(uint64_t   , sceKernelSetMemoryPstate,                     void);
_Fn_(uint64_t   , sceKernelSetNativeModeClock,                  void);
_Fn_(uint64_t   , sceKernelSetNeoModeClock,                     void);
_Fn_(uint64_t   , sceKernelSetPhysFmemLimit,                    void);
_Fn_(uint64_t   , sceKernelSetProcessName,                      void);
_Fn_(uint64_t   , sceKernelSetProcessProperty,                  void);
_Fn_(uint64_t   , sceKernelSetProcessPropertyString,            void);
_Fn_(uint64_t   , sceKernelSetPrtAperture,                      void);
_Fn_(uint64_t   , sceKernelSetSafemode,                         void);
_Fn_(uint64_t   , sceKernelSetTimezoneInfo,                     void);
_Fn_(uint64_t   , sceKernelSetVirtualRangeName,                 void);
_Fn_(uint64_t   , sceKernelSetVmContainer,                      void);
_Fn_(uint64_t   , sceKernelSettimeofday,                        void);
_Fn_(uint64_t   , sceKernelSignalSema,                          void);
_Fn_(uint64_t   , sceKernelSlvNotifyError,                      void);
_Fn_(uint64_t   , sceKernelStat,                                void);
_Fn_(uint64_t   , sceKernelStopUnloadModule,                    void);
_Fn_(uint64_t   , sceKernelSuspendDirectMemoryRelease,          void);
_Fn_(uint64_t   , sceKernelSync,                                void);
_Fn_(uint64_t   , sceKernelTerminateSysCore,                    void);
_Fn_(uint64_t   , sceKernelTitleWorkaroundIsEnabled,            void);
_Fn_(uint64_t   , sceKernelTitleWorkdaroundIsEnabled,           void);
_Fn_(uint64_t   , sceKernelTraceMemoryTypeProtect,              void);
_Fn_(uint64_t   , sceKernelTriggerEport,                        void);
_Fn_(uint64_t   , sceKernelTriggerUserEvent,                    void);
_Fn_(uint64_t   , sceKernelTruncate,                            void);
_Fn_(uint64_t   , sceKernelUnlink,                              char *path);
_Fn_(uint64_t   , sceKernelUtimes,                              void);
_Fn_(uint64_t   , sceKernelUuidCreate,                          void);
_Fn_(uint64_t   , sceKernelVirtualQuery,                        void);
_Fn_(uint64_t   , sceKernelVirtualQueryAll,                     void);
_Fn_(uint64_t   , sceKernelWaitEqueue,                          void);
_Fn_(uint64_t   , sceKernelWaitEventFlag,                       void);
_Fn_(uint64_t   , sceKernelWaitSema,                            void);
_Fn_(uint64_t   , sceKernelWrite,                               void);
_Fn_(uint64_t   , sceKernelWritev,                              void);
_Fn_(uint64_t   , sceKernelGiveDirectMemoryToMapper,            void);
_Fn_(uint64_t   , sceKernelCallIndirectBuffer,                  void);
_Fn_(uint64_t   , sceKernelCallIndirectBuffer2,                 void);
_Fn_(uint64_t   , sceKernelCallIndirectBuffer3,                 void);
_Fn_(uint64_t   , sceKernelWaitCommandBufferCompletion,         void);
_Fn_(uint64_t   , sceKernelWriteEventQueueOnCompletionCommand,  void);
_Fn_(uint64_t   , sceKernelWriteMapCommand,                     void);
_Fn_(uint64_t   , sceKernelWriteMapCommand2,                    void);
_Fn_(uint64_t   , sceKernelWriteMapWithGpuMaskIdCommand,        void);
_Fn_(uint64_t   , sceKernelWriteMapDirectCommand,               void);
_Fn_(uint64_t   , sceKernelWriteMapDirectWithGpuMaskIdCommand,  void);
_Fn_(uint64_t   , sceKernelWriteMultiMapCommand,                void);
_Fn_(uint64_t   , sceKernelWriteMultiMapWithGpuMaskIdCommand,   void);
_Fn_(uint64_t   , sceKernelWriteRemapCommand,                   void);
_Fn_(uint64_t   , sceKernelWriteRemapWithGpuMaskIdCommand,      void);
_Fn_(uint64_t   , sceKernelWriteUnmapCommand,                   void);
_Fn_(uint64_t   , sceKernelWriteModifyProtectCommand,           void);
_Fn_(uint64_t   , sceKernelWriteModifyMtypeProtectCommand,      void);
_Fn_(uint64_t   , sceKernelWriteModifyProtectWithGpuMaskIdCommand,          void);
_Fn_(uint64_t   , sceKernelWriteModifyMtypeProtectWithGpuMaskIdCommand,     void);
_Fn_(uint64_t   , sceKernelWriteWriteAddressCommand,            void);
_Fn_(uint64_t   , sceKernelWriteWriteCounterCommand,            void);
_Fn_(uint64_t   , sceKernelWriteWaitOnAddressCommand,           void);
_Fn_(uint64_t   , sceKernelWriteWaitOnCounterCommand,           void);
_Fn_(uint64_t   , sceKernelMapperGetParam,                      void);
_Fn_(uint64_t   , sceKernelMapperVirtualQuery,                  void);
_Fn_(uint64_t   , sceDebugKernelMapperQueryDmemOffset,          void);
_Fn_(uint64_t   , sceDebugKernelMapperDebugSuspend,             void);
_Fn_(uint64_t   , sceDebugKernelMapperDebugResume,              void);
_Fn_(uint64_t   , sceKernelMapperDebugSuspend,                  void);
_Fn_(uint64_t   , sceKernelMapperDebugResume,                   void);
_Fn_(uint64_t   , sceKernelMapperQueryPa,                       void);
_Fn_(uint64_t   , sceKernelMapperQueryDmemOffset,               void);
_Fn_(uint64_t   , sceKernelYieldCpumode,                        void);
_Fn_(uint64_t   , sceKernelGetPhysPageSize,                     void);
_Fn_(uint64_t   , sceLibcMspaceCreateForMonoMutex,              void);
_Fn_(uint64_t   , scePthreadAtfork,                             void);
_Fn_(uint64_t   , scePthreadAttrDestroy,                        void);
_Fn_(uint64_t   , scePthreadAttrGet,                            void);
_Fn_(uint64_t   , scePthreadAttrGetaffinity,                    void);
_Fn_(uint64_t   , scePthreadAttrGetdetachstate,                 void);
_Fn_(uint64_t   , scePthreadAttrGetguardsize,                   void);
_Fn_(uint64_t   , scePthreadAttrGetinheritsched,                void);
_Fn_(uint64_t   , scePthreadAttrGetschedparam,                  void);
_Fn_(uint64_t   , scePthreadAttrGetschedpolicy,                 void);
_Fn_(uint64_t   , scePthreadAttrGetscope,                       void);
_Fn_(uint64_t   , scePthreadAttrGetsolosched,                   void);
_Fn_(uint64_t   , scePthreadAttrGetstack,                       void);
_Fn_(uint64_t   , scePthreadAttrGetstackaddr,                   void);
_Fn_(uint64_t   , scePthreadAttrGetstacksize,                   void);
_Fn_(uint64_t   , scePthreadAttrInit,                           void);
_Fn_(uint64_t   , scePthreadAttrSetaffinity,                    void);
_Fn_(uint64_t   , scePthreadAttrSetcreatesuspend,               void);
_Fn_(uint64_t   , scePthreadAttrSetdetachstate,                 void);
_Fn_(uint64_t   , scePthreadAttrSetguardsize,                   void);
_Fn_(uint64_t   , scePthreadAttrSetinheritsched,                void);
_Fn_(uint64_t   , scePthreadAttrSetschedother,                  void);
_Fn_(uint64_t   , scePthreadAttrSetschedparam,                  void);
_Fn_(uint64_t   , scePthreadAttrSetschedpolicy,                 void);
_Fn_(uint64_t   , scePthreadAttrSetscope,                       void);
_Fn_(uint64_t   , scePthreadAttrSetstack,                       void);
_Fn_(uint64_t   , scePthreadAttrSetstackaddr,                   void);
_Fn_(uint64_t   , scePthreadAttrSetstacksize,                   void);
_Fn_(uint64_t   , scePthreadAttrSetsolosched,                   void);
_Fn_(uint64_t   , scePthreadBarrierDestroy,                     void);
_Fn_(uint64_t   , scePthreadBarrierInit,                        void);
_Fn_(uint64_t   , scePthreadBarrierWait,                        void);
_Fn_(uint64_t   , scePthreadBarrierattrDestroy,                 void);
_Fn_(uint64_t   , scePthreadBarrierattrGetpshared,              void);
_Fn_(uint64_t   , scePthreadBarrierattrInit,                    void);
_Fn_(uint64_t   , scePthreadBarrierattrSetpshared,              void);
_Fn_(uint64_t   , scePthreadCancel,                             void);
_Fn_(uint64_t   , scePthreadCondBroadcast,                      void);
_Fn_(uint64_t   , scePthreadCondDestroy,                        void);
_Fn_(uint64_t   , scePthreadCondInit,                           void);
_Fn_(uint64_t   , scePthreadCondSignal,                         void);
_Fn_(uint64_t   , scePthreadCondSignalto,                       void);
_Fn_(uint64_t   , scePthreadCondTimedwait,                      void);
_Fn_(uint64_t   , scePthreadCondWait,                           void);
_Fn_(uint64_t   , scePthreadCondattrDestroy,                    void);
_Fn_(uint64_t   , scePthreadCondattrGetclock,                   void);
_Fn_(uint64_t   , scePthreadCondattrGetpshared,                 void);
_Fn_(uint64_t   , scePthreadCondattrInit,                       void);
_Fn_(uint64_t   , scePthreadCondattrSetclock,                   void);
_Fn_(uint64_t   , scePthreadCondattrSetpshared,                 void);
_Fn_(uint64_t   , scePthreadEqual,                              void);
_Fn_(uint64_t   , scePthreadExit,                               void);
_Fn_(uint64_t   , scePthreadGetaffinity,                        void);
_Fn_(uint64_t   , scePthreadGetconcurrency,                     void);
_Fn_(uint64_t   , scePthreadGetcpuclockid,                      void);
_Fn_(uint64_t   , scePthreadGetname,                            void);
_Fn_(uint64_t   , scePthreadGetprio,                            void);
_Fn_(uint64_t   , scePthreadGetschedparam,                      void);
_Fn_(uint64_t   , scePthreadGetspecific,                        void);
_Fn_(uint64_t   , scePthreadGetthreadid,                        void);
_Fn_(uint64_t   , scePthreadJoin,                               void);
_Fn_(uint64_t   , scePthreadKeyCreate,                          void);
_Fn_(uint64_t   , scePthreadKeyDelete,                          void);
_Fn_(uint64_t   , scePthreadMain,                               void);
_Fn_(uint64_t   , scePthreadMulti,                              void);
_Fn_(uint64_t   , scePthreadMutexDestroy,                       void);
_Fn_(uint64_t   , scePthreadMutexGetprioceiling,                void);
_Fn_(uint64_t   , scePthreadMutexGetspinloops,                  void);
_Fn_(uint64_t   , scePthreadMutexGetyieldloops,                 void);
_Fn_(uint64_t   , scePthreadMutexInit,                          void);
_Fn_(uint64_t   , scePthreadMutexInitForInternalLibc,           void);
_Fn_(uint64_t   , scePthreadMutexIsowned,                       void);
_Fn_(uint64_t   , scePthreadMutexLock,                          void);
_Fn_(uint64_t   , scePthreadMutexSetprioceiling,                void);
_Fn_(uint64_t   , scePthreadMutexSetspinloops,                  void);
_Fn_(uint64_t   , scePthreadMutexSetyieldloops,                 void);
_Fn_(uint64_t   , scePthreadMutexTimedlock,                     void);
_Fn_(uint64_t   , scePthreadMutexTrylock,                       void);
_Fn_(uint64_t   , scePthreadMutexUnlock,                        void);
_Fn_(uint64_t   , scePthreadMutexattrDestroy,                   void);
_Fn_(uint64_t   , scePthreadMutexattrGetgen,                    void);
_Fn_(uint64_t   , scePthreadMutexattrGetkind,                   void);
_Fn_(uint64_t   , scePthreadMutexattrGetprioceiling,            void);
_Fn_(uint64_t   , scePthreadMutexattrGetprotocol,               void);
_Fn_(uint64_t   , scePthreadMutexattrGetpshared,                void);
_Fn_(uint64_t   , scePthreadMutexattrGettype,                   void);
_Fn_(uint64_t   , scePthreadMutexattrInit,                      void);
_Fn_(uint64_t   , scePthreadMutexattrInitForInternalLibc,       void);
_Fn_(uint64_t   , scePthreadMutexattrSetgen,                    void);
_Fn_(uint64_t   , scePthreadMutexattrSetkind,                   void);
_Fn_(uint64_t   , scePthreadMutexattrSetprioceiling,            void);
_Fn_(uint64_t   , scePthreadMutexattrSetprotocol,               void);
_Fn_(uint64_t   , scePthreadMutexattrSetpshared,                void);
_Fn_(uint64_t   , scePthreadMutexattrSettype,                   void);
_Fn_(uint64_t   , scePthreadOnce,                               void);
_Fn_(uint64_t   , scePthreadRename,                             void);
_Fn_(uint64_t   , scePthreadResume,                             void);
_Fn_(uint64_t   , scePthreadResumeAll,                          void);
_Fn_(uint64_t   , scePthreadRwlockDestroy,                      void);
_Fn_(uint64_t   , scePthreadRwlockInit,                         void);
_Fn_(uint64_t   , scePthreadRwlockRdlock,                       void);
_Fn_(uint64_t   , scePthreadRwlockTimedrdlock,                  void);
_Fn_(uint64_t   , scePthreadRwlockTimedwrlock,                  void);
_Fn_(uint64_t   , scePthreadRwlockTryrdlock,                    void);
_Fn_(uint64_t   , scePthreadRwlockTrywrlock,                    void);
_Fn_(uint64_t   , scePthreadRwlockUnlock,                       void);
_Fn_(uint64_t   , scePthreadRwlockWrlock,                       void);
_Fn_(uint64_t   , scePthreadRwlockattrDestroy,                  void);
_Fn_(uint64_t   , scePthreadRwlockattrGetpshared,               void);
_Fn_(uint64_t   , scePthreadRwlockattrInit,                     void);
_Fn_(uint64_t   , scePthreadRwlockattrSetpshared,               void);
_Fn_(uint64_t   , scePthreadRwlockattrGettype,                  void);
_Fn_(uint64_t   , scePthreadRwlockattrSettype,                  void);
_Fn_(uint64_t   , scePthreadSelf,                               void);
_Fn_(uint64_t   , scePthreadSemInit,                            void);
_Fn_(uint64_t   , scePthreadSemDestroy,                         void);
_Fn_(uint64_t   , scePthreadSemTimedwait,                       void);
_Fn_(uint64_t   , scePthreadSemGetvalue,                        void);
_Fn_(uint64_t   , scePthreadSemPost,                            void);
_Fn_(uint64_t   , scePthreadSemTrywait,                         void);
_Fn_(uint64_t   , scePthreadSemWait,                            void);
_Fn_(uint64_t   , scePthreadSetBesteffort,                      void);
_Fn_(uint64_t   , scePthreadSetDefaultstacksize,                void);
_Fn_(uint64_t   , scePthreadSetName,                            void);
_Fn_(uint64_t   , scePthreadSetaffinity,                        void);
_Fn_(uint64_t   , scePthreadSetcancelstate,                     void);
_Fn_(uint64_t   , scePthreadSetcanceltype,                      void);
_Fn_(uint64_t   , scePthreadSetconcurrency,                     void);
_Fn_(uint64_t   , scePthreadSetprio,                            void);
_Fn_(uint64_t   , scePthreadSetschedother,                      void);
_Fn_(uint64_t   , scePthreadSetschedparam,                      void);
_Fn_(uint64_t   , scePthreadSetspecific,                        void);
_Fn_(uint64_t   , scePthreadSingle,                             void);
_Fn_(uint64_t   , scePthreadSuspend,                            void);
_Fn_(uint64_t   , scePthreadSuspendAll,                         void);
_Fn_(uint64_t   , scePthreadTestcancel,                         void);
_Fn_(uint64_t   , scePthreadTimedjoin,                          void);
_Fn_(uint64_t   , scePthreadYield,                              void);
_Fn_(uint64_t   , sysKernelGetIntdevModeForRcmgr,               void);
_Fn_(uint64_t   , sysKernelGetIntdevModeForInternalLibc,        void);
_Fn_(uint64_t   , sysKernelGetLowerLimitUpdVersion,             void);
_Fn_(uint64_t   , sysKernelGetLowerLimitSysexVersion,           void);
_Fn_(uint64_t   , sysKernelGetManufacturingMode,                void);
_Fn_(uint64_t   , sysKernelGetUpdVersion,                       void);
_Fn_(uint64_t   , sceKernelGetSystemExVersion,                  void);
_Fn_(uint64_t   , sceKernelGetUpdVersion,                       void);
_Fn_(uint64_t   , sceKernelGetAutoUpdateVersion,                void);
_Fn_(uint64_t   , sceKernelGetBuildNumber,                      void);
_Fn_(uint64_t   , sceKernelIsExperimentalBeta,                  void);
_Fn_(uint64_t   , sceKernelReserve2mbPage,                      void);
_Fn_(uint64_t   , sysarch,                                      void);
_Fn_(long       , sysconf,                                      int);
_Fn_(uint64_t   , sysctl,                                       void);
_Fn_(int        , sysctlbyname,                                 char *, void *, size_t *, void *, size_t);
_Fn_(uint64_t   , sysctlnametomib,                              void);
_Fn_(int        , system,                                       const char *);
_Fn_(uint64_t   , tcdrain,                                      void);
_Fn_(uint64_t   , tcflow,                                       void);
_Fn_(uint64_t   , tcflush,                                      void);
_Fn_(uint64_t   , tcgetattr,                                    void);
_Fn_(pid_t      , tcgetpgrp,                                    int);
_Fn_(uint64_t   , tcgetsid,                                     void);
_Fn_(uint64_t   , tcsendbreak,                                  void);
_Fn_(uint64_t   , tcsetattr,                                    void);
_Fn_(int        , tcsetpgrp,                                    int, pid_t);
_Fn_(uint64_t   , tcsetsid,                                     void);
_Fn_(int        , truncate,                                     const char *, off_t);
_Fn_(int        , unlink,                                       const char *);
_Fn_(int        , usleep,                                       useconds_t);
//_Fn_(uint64_t   , utimes,                                       void);
_Fn_(uint64_t   , uuidgen,                                      void);
_Fn_(uint64_t   , wait,                                         void);
_Fn_(uint64_t   , wait3,                                        void);
_Fn_(uint64_t   , waitpid,                                      void);
_Fn_(ssize_t    , write,                                        int, const void *, size_t);
_Fn_(uint64_t   , writev,                                       void);

_Fn_(uint64_t   , sceKernelIsCronos,                            void);
_Fn_(uint64_t   , sceKernelUseCronosKura,                       void);
_Fn_(uint64_t   , sceKernelUseCronosStreaming,                  void);

_Fn_(uint64_t   , environ,                                      void);
_Fn_(uint64_t   , sigcode_addr,                                 void);

#endif // PS5SDK_LIBKERNEL_H
